<?php

abstract class ViewFilter
{

  protected static $filters = array();

  public function filter($output)
  {
    return $output;
  }

  /**
   *
   * @param string $filter
   * @return ViewFilter
   */
  public static function factory($filter)
  {
    if (! isset(self::$filters[$filter])) {
      self::$filters[$filter] = new $filter();
    }

    return self::$filters[$filter];
  }

}

?>